package com.jml.config;


import com.jml.proxy.JmlInvocationHandler;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.web.client.RestTemplate;


@Import(FeignClientsRegistrar.class)
public class JmlAutoConfiguration {

    @Bean
    public JmlFeignConfig jmlFeignConfig() {
        return new JmlFeignConfig();
    }

    @Bean
    public JmlInvocationHandler jmlInvocationHandler() {
        return new JmlInvocationHandler();
    }
 
    @Bean
    public FeignClientsRegistrar feignClientsRegistrar() {
        return new FeignClientsRegistrar();
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
